Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove enzyme #2724

Merged
merged 17 commits into from
Dec 9, 2024
Merged

Remove enzyme #2724

merged 17 commits into from
Dec 9, 2024

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Dec 2, 2024

No description provided.

@zatteo zatteo changed the title Feat/remove enzyme Remove enzyme Dec 2, 2024
zatteo added 16 commits December 6, 2024 10:17
Icon has been mocked because we test here AppIcon and not Icon.

Last test `renders provided fallbackIcon on img error` has been deleted because it is very close to `renders provided fallbackIcon when fetch error occurs` and it was testing internals which we do not test with react-testing-library
I added onChange attribute to avoid test failing because "Warning:
Failed prop type: You provided a `value` prop to a form field without
an `onChange` handler. This will render a read-only field. If the
field should be mutable use `defaultValue`. Otherwise, set either
`onChange` or `readOnly`."
I kept the snapshot here because it works well like this and it would take time to refactor for little benefits.
Almost 100% rewritten because we are testing internals (and for a good reason here because it has no UI) and it is very different to test internal in enzyme and react-testing-library.
It is just a single snapshot that has no really purpose.
Passing props to the input is not a react-testing-library kind of tests.
@zatteo zatteo force-pushed the feat/remove-enzyme branch from b59bc54 to 93323a8 Compare December 6, 2024 09:19
@zatteo zatteo force-pushed the feat/remove-enzyme branch from 93323a8 to 30ac215 Compare December 6, 2024 10:02
Copy link

bundlemon bot commented Dec 6, 2024

BundleMon

Files updated (1)
Status Path Size Limits
transpiled/react/stylesheet.css
4.81KB (-27B -0.55%) +10%
Unchanged files (2)
Status Path Size Limits
dist/cozy-ui.min.css
20.23KB +10%
dist/cozy-ui.utils.min.css
10.91KB +10%

Total files change -27B -0.07%

Groups updated (1)
Status Path Size Limits
transpiled/react/**
651.79KB (-22B 0%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

react/ContactsList/ContactRow.spec.js Show resolved Hide resolved
react/examples.spec.jsx Show resolved Hide resolved
@JF-Cozy
Copy link
Collaborator

JF-Cozy commented Dec 9, 2024

Bravo pour la PR 👏

@zatteo zatteo merged commit 9c26d28 into master Dec 9, 2024
12 checks passed
@zatteo zatteo deleted the feat/remove-enzyme branch December 9, 2024 10:45
@cozy-bot
Copy link

🎉 This PR is included in version 113.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants